Image Segmentation with Touch Interaction

ABSTRACT

In one embodiment, a method includes detecting one or more objects in an image, generating at least one mask for each of the detected objects, wherein each of the masks is defined by a perimeter, classifying the detected objects, receiving gesture input in relation to the image, determining whether one or more locations associated with the gesture input correlate with any of the masks, and providing feedback regarding the image in response to the gesture input. Each of the masks may include data identifying the corresponding detected object, and the perimeter of each mask may correspond to a perimeter of the corresponding detected object. The perimeter of the corresponding detected object may separate the detected object from one or more portions of the image that are distinct from the detected object.

TECHNICAL FIELD

This disclosure generally relates to recognition of and interaction withobjects in digital images or videos.

BACKGROUND

A social-networking system, which may include a social-networkingwebsite, may enable its users (such as persons or organizations) tointeract with it and with each other through it. The social-networkingsystem may, with input from a user, create and store in thesocial-networking system a user profile associated with the user. Theuser profile may include demographic information, communication-channelinformation, and information on personal interests of the user. Thesocial-networking system may also, with input from a user, create andstore a record of relationships of the user with other users of thesocial-networking system, as well as provide services (e.g., wall posts,photo-sharing, event organization, messaging, games, or advertisements)to facilitate social interaction between or among users.

The social-networking system may send over one or more networks contentor messages related to its services to a mobile or other computingdevice of a user. A user may also install software applications on amobile or other computing device of the user for accessing a userprofile of the user and other data within the social-networking system.The social-networking system may generate a personalized set of contentobjects to display to a user, such as a newsfeed of aggregated storiesof other users connected to the user.

SUMMARY OF PARTICULAR EMBODIMENTS

In particular embodiments, a system may use image segmentation andclassification techniques to automatically identify and classify objectsdisplayed in images, and use the resulting information about thedisplayed objects and their types to interact with users in ways thatmay have previously been difficult or impractical to implement. Anobject may be any suitable identifiable item in an image (e.g., aperson, an animal, an arm, a table, a cup, etc.). For example, theinformation about the objects may be used to describe the content ofphotos to blind users. An audio description such as “photo contains agirl, a man in a hat, and a table” may be played or spoken by atext-to-speech system. The techniques disclosed herein can, for example,provide immersive experiences that allow users to perceive the objectsin a photo by swiping their finger across an image on a touch screendisplay and having the system describe the objects that are touched.

In particular embodiments, a user of a virtual reality environment mayrequest that an image be made of a portion of the user's view, and amask be generated based on the image. The mask may be generated usingimage segmentation techniques. The user may then apply the mask to a 3Dobject in the virtual reality environment. When the mask is applied to a3D object, the object depicted in the image that corresponds to the maskis incorporated into the 3D object to form a virtual object. Theincorporated image or portion thereof may then appear in associationwith, e.g., as if attached to or rendered onto a surface of, the 3Dobject in the virtual reality environment, thus forming a new virtualobject. For example, the incorporated image may be represented as aphotograph attached to the 3D object at a location on the 3D objectdesignated by the user. As another example, the incorporated image maybe represented as if it is painted onto the 3D object at a locationdesignated by the user. That is, the mask may be used like a stickerthat depicts the incorporated image, and can be affixed to the 3D objectwhile molding its shape to conform to the shape of the 3D object asappropriate.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example network environment associated with asocial-networking system.

FIG. 2 illustrates an example social graph.

FIG. 3 illustrates example objects in an image.

FIG. 4 illustrates example perimeters of masks for objects in an image.

FIG. 5 illustrates example masks for objects in an image.

FIG. 6 illustrates an example method for generating interactive objectsbased on an image.

FIG. 7 illustrates an example of applying a mask generated from an imageto a three-dimensional object in a virtual reality environment.

FIG. 8 illustrates an example method for generating a mask from an imageand applying the mask object to a three-dimensional object in a virtualreality environment.

FIG. 9 illustrates an example computer system.

DESCRIPTION OF EXAMPLE EMBODIMENTS

FIG. 1 illustrates an example network environment 100 associated with asocial-networking system. Network environment 100 includes a user 101, aclient system 130, a social-networking system 160, and a third-partysystem 170 connected to each other by a network 110. Although FIG. 1illustrates a particular arrangement of user 101, client system 130,social-networking system 160, third-party system 170, and network 110,this disclosure contemplates any suitable arrangement of user 101,client system 130, social-networking system 160, third-party system 170,and network 110. As an example and not by way of limitation, two or moreof client system 130, social-networking system 160, and third-partysystem 170 may be connected to each other directly, bypassing network110. As another example, two or more of client system 130,social-networking system 160, and third-party system 170 may bephysically or logically co-located with each other in whole or in part.Moreover, although FIG. 1 illustrates a particular number of users 101,client systems 130, social-networking systems 160, third-party systems170, and networks 110, this disclosure contemplates any suitable numberof users 101, client systems 130, social-networking systems 160,third-party systems 170, and networks 110. As an example and not by wayof limitation, network environment 100 may include multiple users 101,client system 130, social-networking systems 160, third-party systems170, and networks 110.

In particular embodiments, user 101 may be an individual (human user),an entity (e.g., an enterprise, business, or third-party application),or a group (e.g., of individuals or entities) that interacts orcommunicates with or over social-networking system 160. In particularembodiments, social-networking system 160 may be a network-addressablecomputing system hosting an online social network. Social-networkingsystem 160 may generate, store, receive, and send social-networkingdata, such as, for example, user-profile data, concept-profile data,social-graph information, or other suitable data related to the onlinesocial network. Social-networking system 160 may be accessed by theother components of network environment 100 either directly or vianetwork 110. In particular embodiments, social-networking system 160 mayinclude an authorization server (or other suitable component(s)) thatallows users 101 to opt in to or opt out of having their actions loggedby social-networking system 160 or shared with other systems (e.g.,third-party systems 170), for example, by setting appropriate privacysettings. A privacy setting of a user may determine what informationassociated with the user may be logged, how information associated withthe user may be logged, when information associated with the user may belogged, who may log information associated with the user, whominformation associated with the user may be shared with, and for whatpurposes information associated with the user may be logged or shared.Authorization servers may be used to enforce one or more privacysettings of the users of social-networking system 30 through blocking,data hashing, anonymization, or other suitable techniques asappropriate. Client system 130 may be any suitable computing device,such as, for example, a personal computer, a laptop computer, a cellulartelephone, a smartphone, a tablet computer, or an augmented/virtualreality device.

This disclosure contemplates any suitable network 110. As an example andnot by way of limitation, one or more portions of network 110 mayinclude an ad hoc network, an intranet, an extranet, a virtual privatenetwork (VPN), a local area network (LAN), a wireless LAN (WLAN), a widearea network (WAN), a wireless WAN (WWAN), a metropolitan area network(MAN), a portion of the Internet, a portion of the Public SwitchedTelephone Network (PSTN), a cellular telephone network, or a combinationof two or more of these. Network 110 may include one or more networks110.

Links 150 may connect client system 130, social-networking system 160,and third-party system 170 to communication network 110 or to eachother. This disclosure contemplates any suitable links 150. Inparticular embodiments, one or more links 150 include one or morewireline (such as for example Digital Subscriber Line (DSL) or Data OverCable Service Interface Specification (DOC SIS)), wireless (such as forexample Wi-Fi or Worldwide Interoperability for Microwave Access(WiMAX)), or optical (such as for example Synchronous Optical Network(SONET) or Synchronous Digital Hierarchy (SDH)) links. In particularembodiments, one or more links 150 each include an ad hoc network, anintranet, an extranet, a VPN, a LAN, a WLAN, a WAN, a WWAN, a MAN, aportion of the Internet, a portion of the PSTN, a cellulartechnology-based network, a satellite communications technology-basednetwork, another link 150, or a combination of two or more such links150. Links 150 need not necessarily be the same throughout networkenvironment 100. One or more first links 150 may differ in one or morerespects from one or more second links 150.

FIG. 2 illustrates example social graph 200. In particular embodiments,social-networking system 160 may store one or more social graphs 200 inone or more data stores. In particular embodiments, social graph 200 mayinclude multiple nodes—which may include multiple user nodes 202 ormultiple concept nodes 204—and multiple edges 206 connecting the nodes.Example social graph 200 illustrated in FIG. 2 is shown, for didacticpurposes, in a two-dimensional visual map representation. In particularembodiments, a social-networking system 160, client system 130, orthird-party system 170 may access social graph 200 and relatedsocial-graph information for suitable applications. The nodes and edgesof social graph 200 may be stored as data objects, for example, in adata store (such as a social-graph database). Such a data store mayinclude one or more searchable or queryable indexes of nodes or edges ofsocial graph 200.

In particular embodiments, a user node 202 may correspond to a user ofsocial-networking system 160. As an example and not by way oflimitation, a user may be an individual (human user), an entity (e.g.,an enterprise, business, or third-party application), or a group (e.g.,of individuals or entities) that interacts or communicates with or oversocial-networking system 160. In particular embodiments, when a userregisters for an account with social-networking system 160,social-networking system 160 may create a user node 202 corresponding tothe user, and store the user node 202 in one or more data stores. Usersand user nodes 202 described herein may, where appropriate, refer toregistered users and user nodes 202 associated with registered users. Inaddition or as an alternative, users and user nodes 202 described hereinmay, where appropriate, refer to users that have not registered withsocial-networking system 160. In particular embodiments, a user node 202may be associated with information provided by a user or informationgathered by various systems, including social-networking system 160. Asan example and not by way of limitation, a user may provide his or hername, profile picture, contact information, birth date, sex, maritalstatus, family status, employment, education background, preferences,interests, or other demographic information. In particular embodiments,a user node 202 may be associated with one or more data objectscorresponding to information associated with a user. In particularembodiments, a user node 202 may correspond to one or more webpages.

In particular embodiments, a concept node 204 may correspond to aconcept. As an example and not by way of limitation, a concept maycorrespond to a place (such as, for example, a movie theater,restaurant, landmark, or city); a website (such as, for example, awebsite associated with social-network system 160 or a third-partywebsite associated with a web-application server); an entity (such as,for example, a person, business, group, sports team, or celebrity); aresource (such as, for example, an audio file, video file, digitalphoto, text file, structured document, or application) which may belocated within social-networking system 160 or on an external server,such as a web-application server; real or intellectual property (suchas, for example, a sculpture, painting, movie, game, song, idea,photograph, or written work); a game; an activity; an idea or theory; anobject in a augmented/virtual reality environment; another suitableconcept; or two or more such concepts. A concept node 204 may beassociated with information of a concept provided by a user orinformation gathered by various systems, including social-networkingsystem 160. As an example and not by way of limitation, information of aconcept may include a name or a title; one or more images (e.g., animage of the cover page of a book); a location (e.g., an address or ageographical location); a website (which may be associated with a URL);contact information (e.g., a phone number or an email address); othersuitable concept information; or any suitable combination of suchinformation. In particular embodiments, a concept node 204 may beassociated with one or more data objects corresponding to informationassociated with concept node 204. In particular embodiments, a conceptnode 204 may correspond to one or more webpages.

In particular embodiments, a node in social graph 200 may represent orbe represented by a webpage (which may be referred to as a “profilepage”). Profile pages may be hosted by or accessible tosocial-networking system 160. Profile pages may also be hosted onthird-party websites associated with a third-party server 170. As anexample and not by way of limitation, a profile page corresponding to aparticular external webpage may be the particular external webpage andthe profile page may correspond to a particular concept node 204.Profile pages may be viewable by all or a selected subset of otherusers. As an example and not by way of limitation, a user node 202 mayhave a corresponding user-profile page in which the corresponding usermay add content, make declarations, or otherwise express himself orherself. As another example and not by way of limitation, a concept node204 may have a corresponding concept-profile page in which one or moreusers may add content, make declarations, or express themselves,particularly in relation to the concept corresponding to concept node204.

In particular embodiments, a concept node 204 may represent athird-party webpage or resource hosted by a third-party system 170. Thethird-party webpage or resource may include, among other elements,content, a selectable or other icon, or other inter-actable object(which may be implemented, for example, in JavaScript, AJAX, or PHPcodes) representing an action or activity. As an example and not by wayof limitation, a third-party webpage may include a selectable icon suchas “like,” “check-in,” “eat,” “recommend,” or another suitable action oractivity. A user viewing the third-party webpage may perform an actionby selecting one of the icons (e.g., “check-in”), causing a clientsystem 130 to send to social-networking system 160 a message indicatingthe user's action. In response to the message, social-networking system160 may create an edge (e.g., a check-in-type edge) between a user node202 corresponding to the user and a concept node 204 corresponding tothe third-party webpage or resource and store edge 206 in one or moredata stores.

In particular embodiments, a pair of nodes in social graph 200 may beconnected to each other by one or more edges 206. An edge 206 connectinga pair of nodes may represent a relationship between the pair of nodes.In particular embodiments, an edge 206 may include or represent one ormore data objects or attributes corresponding to the relationshipbetween a pair of nodes. As an example and not by way of limitation, afirst user may indicate that a second user is a “friend” of the firstuser. In response to this indication, social-networking system 160 maysend a “friend request” to the second user. If the second user confirmsthe “friend request,” social-networking system 160 may create an edge206 connecting the first user's user node 202 to the second user's usernode 202 in social graph 200 and store edge 206 as social-graphinformation in one or more of data stores 164. In the example of FIG. 2,social graph 200 includes an edge 206 indicating a friend relationbetween user nodes 202 of user “A” and user “B” and an edge indicating afriend relation between user nodes 202 of user “C” and user “B.”Although this disclosure describes or illustrates particular edges 206with particular attributes connecting particular user nodes 202, thisdisclosure contemplates any suitable edges 206 with any suitableattributes connecting user nodes 202. As an example and not by way oflimitation, an edge 206 may represent a friendship, family relationship,business or employment relationship, fan relationship (including, e.g.,liking, etc.), follower relationship, visitor relationship (including,e.g., accessing, viewing, checking-in, sharing, etc.), subscriberrelationship, superior/subordinate relationship, reciprocalrelationship, non-reciprocal relationship, another suitable type ofrelationship, or two or more such relationships. Moreover, although thisdisclosure generally describes nodes as being connected, this disclosurealso describes users or concepts as being connected. Herein, referencesto users or concepts being connected may, where appropriate, refer tothe nodes corresponding to those users or concepts being connected insocial graph 200 by one or more edges 206.

In particular embodiments, an edge 206 between a user node 202 and aconcept node 204 may represent a particular action or activity performedby a user associated with user node 202 toward a concept associated witha concept node 204. As an example and not by way of limitation, asillustrated in FIG. 2, a user may “like,” “attended,” “played,”“listened,” “cooked,” “worked at,” or “watched” a concept, each of whichmay correspond to an edge type or subtype. A concept-profile pagecorresponding to a concept node 204 may include, for example, aselectable “check in” icon (such as, for example, a clickable “check in”icon) or a selectable “add to favorites” icon. Similarly, after a userclicks these icons, social-networking system 160 may create a “favorite”edge or a “check in” edge in response to a user's action correspondingto a respective action. As another example and not by way of limitation,a user (user “C”) may listen to a particular song (“Imagine”) using aparticular application (SPOTIFY, which is an online music application).In this case, social-networking system 160 may create a “listened” edge206 and a “used” edge (as illustrated in FIG. 2) between user nodes 202corresponding to the user and concept nodes 204 corresponding to thesong and application to indicate that the user listened to the song andused the application. Moreover, social-networking system 160 may createa “played” edge 206 (as illustrated in FIG. 2) between concept nodes 204corresponding to the song and the application to indicate that theparticular song was played by the particular application. In this case,“played” edge 206 corresponds to an action performed by an externalapplication (SPOTIFY) on an external audio file (the song “Imagine”).Although this disclosure describes particular edges 206 with particularattributes connecting user nodes 202 and concept nodes 204, thisdisclosure contemplates any suitable edges 206 with any suitableattributes connecting user nodes 202 and concept nodes 204. Moreover,although this disclosure describes edges between a user node 202 and aconcept node 204 representing a single relationship, this disclosurecontemplates edges between a user node 202 and a concept node 204representing one or more relationships. As an example and not by way oflimitation, an edge 206 may represent both that a user likes and hasused at a particular concept. Alternatively, another edge 206 mayrepresent each type of relationship (or multiples of a singlerelationship) between a user node 202 and a concept node 204 (asillustrated in FIG. 2 between user node 202 for user “E” and conceptnode 204 for “SPOTIFY”).

In particular embodiments, social-networking system 160 may create anedge 206 between a user node 202 and a concept node 204 in social graph200. As an example and not by way of limitation, a user viewing aconcept-profile page (such as, for example, by using a web browser or aspecial-purpose application hosted by the user's client system 130) mayindicate that he or she likes the concept represented by the conceptnode 204 by clicking or selecting a “Like” icon, which may cause theuser's client system 130 to send to social-networking system 160 amessage indicating the user's liking of the concept associated with theconcept-profile page. In response to the message, social-networkingsystem 160 may create an edge 206 between user node 202 associated withthe user and concept node 204, as illustrated by “like” edge 206 betweenthe user and concept node 204. In particular embodiments,social-networking system 160 may store an edge 206 in one or more datastores. In particular embodiments, an edge 206 may be automaticallyformed by social-networking system 160 in response to a particular useraction. As an example and not by way of limitation, if a first useruploads a picture, watches a movie, or listens to a song, an edge 206may be formed between user node 202 corresponding to the first user andconcept nodes 204 corresponding to those concepts. Although thisdisclosure describes forming particular edges 206 in particular manners,this disclosure contemplates forming any suitable edges 206 in anysuitable manner.

In particular embodiments, an advertisement may be text (which may beHTML-linked), one or more images (which may be HTML-linked), one or morevideos, audio, other suitable digital object files, a suitablecombination of these, or any other suitable advertisement in anysuitable digital format presented on one or more webpages, in one ormore e-mails, or in connection with search results requested by a user.In addition or as an alternative, an advertisement may be one or moresponsored stories (e.g., a news-feed or ticker item on social-networkingsystem 160). A sponsored story may be a social action by a user (such as“liking” a page, “liking” or commenting on a post on a page, RSVPing toan event associated with a page, voting on a question posted on a page,checking in to a place, using an application or playing a game, or“liking” or sharing a website) that an advertiser promotes, for example,by having the social action presented within a pre-determined area of aprofile page of a user or other page, presented with additionalinformation associated with the advertiser, bumped up or otherwisehighlighted within news feeds or tickers of other users, or otherwisepromoted. The advertiser may pay to have the social action promoted. Asan example and not by way of limitation, advertisements may be includedamong the search results of a search-results page, where sponsoredcontent is promoted over non-sponsored content.

In particular embodiments, an advertisement may be requested for displaywithin social-networking-system webpages, third-party webpages, or otherpages. An advertisement may be displayed in a dedicated portion of apage, such as in a banner area at the top of the page, in a column atthe side of the page, in a GUI of the page, in a pop-up window, in adrop-down menu, in an input field of the page, over the top of contentof the page, or elsewhere with respect to the page. In addition or as analternative, an advertisement may be displayed within an application. Anadvertisement may be displayed within dedicated pages, requiring theuser to interact with or watch the advertisement before the user mayaccess a page or utilize an application. The user may, for example viewthe advertisement through a web browser.

A user may interact with an advertisement in any suitable manner. Theuser may click or otherwise select the advertisement. By selecting theadvertisement, the user may be directed to (or a browser or otherapplication being used by the user) a page associated with theadvertisement. At the page associated with the advertisement, the usermay take additional actions, such as purchasing a product or serviceassociated with the advertisement, receiving information associated withthe advertisement, or subscribing to a newsletter associated with theadvertisement. An advertisement with audio or video may be played byselecting a component of the advertisement (like a “play button”).Alternatively, by selecting the advertisement, social-networking system160 may execute or modify a particular action of the user.

An advertisement may also include social-networking-system functionalitythat a user may interact with. As an example and not by way oflimitation, an advertisement may enable a user to “like” or otherwiseendorse the advertisement by selecting an icon or link associated withendorsement. As another example and not by way of limitation, anadvertisement may enable a user to search (e.g., by executing a query)for content related to the advertiser. Similarly, a user may share theadvertisement with another user (e.g., through social-networking system160) or RSVP (e.g., through social-networking system 160) to an eventassociated with the advertisement. In addition or as an alternative, anadvertisement may include social-networking-system content directed tothe user. As an example and not by way of limitation, an advertisementmay display information about a friend of the user withinsocial-networking system 160 who has taken an action associated with thesubject matter of the advertisement.

In particular embodiments, one or more of the content objects of theonline social network may be associated with a privacy setting. Theprivacy settings (or “access settings”) for an object may be stored inany suitable manner, such as, for example, in association with theobject, in an index on an authorization server, in another suitablemanner, or any combination thereof. A privacy setting of an object mayspecify how the object (or particular information associated with anobject) can be accessed (e.g., viewed or shared) using the online socialnetwork. Where the privacy settings for an object allow a particularuser to access that object, the object may be described as being“visible” with respect to that user. As an example and not by way oflimitation, a user of the online social network may specify privacysettings for a user-profile page that identify a set of users that mayaccess the work experience information on the user-profile page, thusexcluding other users from accessing the information. In particularembodiments, the privacy settings may specify a “blocked list” of usersthat should not be allowed to access certain information associated withthe object. In other words, the blocked list may specify one or moreusers or entities for which an object is not visible. As an example andnot by way of limitation, a user may specify a set of users that may notaccess photos albums associated with the user, thus excluding thoseusers from accessing the photo albums (while also possibly allowingcertain users not within the set of users to access the photo albums).In particular embodiments, privacy settings may be associated withparticular social-graph elements. Privacy settings of a social-graphelement, such as a node or an edge, may specify how the social-graphelement, information associated with the social-graph element, orcontent objects associated with the social-graph element can be accessedusing the online social network. As an example and not by way oflimitation, a particular concept node 204 corresponding to a particularphoto may have a privacy setting specifying that the photo may only beaccessed by users tagged in the photo and their friends. In particularembodiments, privacy settings may allow users to opt in or opt out ofhaving their actions logged by social-networking system 160 or sharedwith other systems (e.g., third-party system 170). In particularembodiments, the privacy settings associated with an object may specifyany suitable granularity of permitted access or denial of access. As anexample and not by way of limitation, access or denial of access may bespecified for particular users (e.g., only me, my roommates, and myboss), users within a particular degrees-of-separation (e.g., friends,or friends-of-friends), user groups (e.g., the gaming club, my family),user networks (e.g., employees of particular employers, students oralumni of particular university), all users (“public”), no users(“private”), users of third-party systems 170, particular applications(e.g., third-party applications, external websites), other suitableusers or entities, or any combination thereof. Although this disclosuredescribes using particular privacy settings in a particular manner, thisdisclosure contemplates using any suitable privacy settings in anysuitable manner.

In particular embodiments, one or more servers 162 may beauthorization/privacy servers for enforcing privacy settings. Inresponse to a request from a user (or other entity) for a particularobject stored in a data store 164, social-networking system 160 may senda request to the data store 164 for the object. The request may identifythe user associated with the request and may only be sent to the user(or a client system 130 of the user) if the authorization serverdetermines that the user is authorized to access the object based on theprivacy settings associated with the object. If the requesting user isnot authorized to access the object, the authorization server mayprevent the requested object from being retrieved from the data store164, or may prevent the requested object from be sent to the user. Inthe search query context, an object may only be generated as a searchresult if the querying user is authorized to access the object. In otherwords, the object must have a visibility that is visible to the queryinguser. If the object has a visibility that is not visible to the user,the object may be excluded from the search results. Although thisdisclosure describes enforcing privacy settings in a particular manner,this disclosure contemplates enforcing privacy settings in any suitablemanner.

In particular embodiments, a system may display an image on a clientsystem 130, then automatically identify objects in the image and providefeedback, such as written or spoken audio descriptions of the objects,in response to user gestures. The gestures may be associated with animage, e.g., gestures that cause the image to be displayed, in whichcase descriptions of the objects in the image may be provided to theuser. The gestures may also touch, point to, or otherwise indicatespecific portions of the image, in which case the system may identifyspecific objects displayed in the image at the locations indicated bythe gestures. Descriptions of the identified objects may then beprovided to the user. An object may be any suitable identifiable item inan image (e.g., a person, an animal, an arm, a leg, a cup, etc.).Objects of many types can be identified accurately by a human viewingthe image. For example, FIG. 3 illustrates several objects in an image,including a person, two animals sitting at a table, and several tea cupsand a tea pot on the table.

An automated system may thus identify and classify the objects inimages, and use the resulting information to interact with users in waysthat may have previously been difficult or impractical to implement. Forexample, the information may be used to describe the content of photosto blind users. An audio description such as “photo contains a girl, ahare, a mouse, a man in a hat, and a table” may be played or spoken by atext-to-speech system. The techniques disclosed herein can provideimmersive experiences that allow users to perceive the objects in aphoto by swiping their finger across an image on a touch screen displayand having the system describe the content they are touching.

FIG. 3 illustrates example objects 302-320 in an image 300. Inparticular embodiments, objects in an image may be identified andclassified by algorithms using machine learning techniques. Objects302-320 may be identified using image segmentation techniques such asDeepMask and SharpMask, and classified using image classificationtechniques such as MuiltiPathNet. Image Segmentation methods aredisclosed in U.S. Patent Application 62/351,851, filed 17 Jun. 2016,which is incorporated herein by reference. Although specific techniquesare described for image identification and classification, othertechniques may be used to identify image segments that correspond toobjects and classify the objects. Information identifying an object mayinclude the location of the object in the image and the perimeter of theobject, e.g., coordinates of the object and of the pixels that form theperimeter of the object. An object may have an associated object type,which may correspond to a classification determined by an imageclassification technique. The object type may be a classification suchas person or human for an Alice object 302 and a Mad Hatter object 308,hare for a March Hare object 304, mouse for a Dormouse object 306,window for a window object 310, hat for a Mad Hatter's hat, table for atable 312, tea pot for a tea pot 314, tea cup a the tea cup 318, andsaucer for saucers 316, 320. The information identifying an object mayalso include an object name that identifies a specific instance of theobject type, e.g., “Alice” may be identified as the name of the Aliceobject 302, and “March Hare” may be identified as the name of the MarchHare 304.

FIG. 4 illustrates example perimeters 402-420 of objects in an image,and FIG. 5 illustrates masks 502-520 for the objects in the image. Theidentification and classification of objects may involve imagerecognition. For example, a mask 502 may be identified that correspondsto an Alice object 302 in the image 300, and may be classified as aperson via image recognition. Masks 502-520 correspond to the respectiveobjects 302-320 and are bounded by the respective perimeters 402-420.For example, the perimeters shown in FIG. 4 include an Alice perimeter402 for the Alice object 302, a Mad Hatter perimeter 408 for the MadHatter object 308, a March Hare perimeter 404 for the March Hare object304, a Dormouse perimeter 406 for the Dormouse object 306, a windowperimeter 410 for the window object 310, a table perimeter 412 for thetable object 312, tea pot perimeter 414 for the tea pot object 314, atea cup perimeter 418 for the tea cup object 318, and saucer perimeters416, 420 for the saucer objects 316, 320.

In particular embodiments, mask 502 may be defined by a perimeter 402 ofan object 302, and ordinarily includes a data structure representing thepositions of the pixels in the mask 502, which may be based on thepositions of corresponding pixels in the object 302. As can be seen inthe example of FIG. 5, the shapes of the masks 502-520 correspond to theshapes of the object perimeters 402-420, which in turn correspond to theshapes of the objects 302-320. For example, the masks shown in FIG. 5include an Alice mask 502 for the Alice object 302, a Mad Hatter mask508 for the Mad Hatter object 308, a March Hare mask 504 for the MarchHare object 304, a Dormouse mask 506 for the Dormouse object 306, awindow mask 510 for the window object 310, a tea pot mask 514 for thetea pot object 314, a tea cup mask 518 for the tea cup object 318, andsaucer masks 516, 520 for the saucer objects 316, 320.

Objects may overlap other objects, e.g., the tea pot 314 overlaps thehare 304 and the table 312, and the hare 304 overlaps the window 310.The image segmentation algorithm may identify an object that overlapsanother object and generate the perimeters 402-420 (and masks 502-420)accordingly. In one example, any pixel within the tea pot perimeter 414corresponds to the tea pot 314, any pixel within the March Hareperimeter 404 correspond to the March Hare 304, and the pixels withinthe tea pot perimeter 414 do not correspond to the March Hare 304 (eventhough the tea pot 314 occupies a region that would otherwise containpart of the March Hare 304 if the tea pot 314 were not present), becausethe tea pot 314 overlaps the March Hare 304. Similarly, the pixelswithin the window perimeter 410 correspond to the window 310, except forthe pixels in the portion of the window 310 overlapped by the March Hare304, which correspond to the March Hare 304. The boundaries between theoverlapping objects 314, 304, and 310 are shown as white space betweenthe masks 514, 504, and 510 in FIG. 5 for illustrative purposes. In oneembodiment, the boundaries between overlapping objects are not emptyregions, but instead correspond to the locations at which pixels fromone object meet pixels from another object. Thus, a user 101 may slide afinger from the March Hare 304 to the tea pot 314, and when the fingerfirst touches a pixel in the tea pot 314, which corresponds to a pixelin the mask 514, the tea pot 314 becomes the object designated by thefinger. The gap between adjacent masks in FIG. 5 is shown forillustrative purposes. Pixels of the March Hare mask 504 may be adjacentto pixels of the tea pot mask 514 in the region shown as a gap betweenthe two masks.

In particular embodiments, there may be a boundary between overlappingobjects 304, 314, which may be displayed as part of the image 300 and/orrepresented as data associated with the adjacent masks 504, 514. Theboundary may be displayed to assist the user 101 in distinguishingbetween overlapping objects, for example. In one example, the boundarymay be shown by displaying the perimeters around the objects, such asthe March Hare perimeter 404 and the tea pot perimeter 414. Theperimeters may be displayed as shown in FIG. 4, e.g., as dashed ordotted lines of any appropriate width or color, or as solid lines of anyappropriate width or color. In another example, only the portions of theperimeters that are between the overlapping objects, e.g., the portionsof a perimeter that overlap a perimeter of another mask, may be shown,to indicate the boundaries between overlapping objects. In this example,the portion of the tea pot perimeter 414, which may overlap the MarchHare perimeter 404, may be displayed as a boundary between the tea pot314 and the March Hare 304. Some masks may be non-classified, e.g.,object recognition may fail to recognize an object, or may have a lowcertainty about an identified object.

Image segmentation or classification may identify object types, and mayalso identify relationships or properties of objects. As an example,classification may determine that one object is behind another object,or that an object is red. Relationships between objects may beidentified based on other objects in an image. For example, in an imagedepicting a bus and a person, the relative positions of the bus andperson may be determined based on a known size ratio between people andbuses. In this example, the bus being relatively small in the image andthe person relatively large in the image compared to the known ratio mayindicate that the bus is farther away than the person, so the bus isbehind the person. If, e.g., an object 304 is identified as being behindor in front of another object 314, then this relationship may beincluded as part of the description of either or both of the objects.For example, when a user 101 selects an object 304 that is behindanother object 314, the description may include a displayed or spokenindication that the object is behind the other object. If a user 101selects the March Hare 305, e.g., by swiping on or pointing to it, thenthe description “A rabbit behind a tea pot”, “The Match Hare behind atea pot,” or “The March Hare, which is a rabbit, behind a tea pot, whichis on a table” may be displayed or spoken to the user.

When two or more of the objects 304, 314 in an image 300 overlap, thecorresponding masks 504, 514 may be non-overlapping, with boundariesbetween the masks 504, 514 at the boundaries between overlapping objects304, 314. Alternatively, the masks 504, 514 may overlap, in which casethe mask 514 corresponding to the object 314 closest to the front (e.g.,the front-most mask) may be selected when the user 101 selects a pixelthat is on each of the overlapping masks (e.g., a pixel in the region ofthe image in which the objects 304, 314 intersect). In particularembodiments, both an overlapping object, such as the tea pot 314, and anoverlapped object, such as the March Hare 304, may be identified asoccupying the same region, which is ordinarily an intersection of theregions occupied by the two objects 304, 314 in the image 300. Forexample, the image segmentation algorithm may determine that the MarchHare 304 occupies a portion of the region behind the tea pot 314, whichis the region above the upper line of the table occupied by the upperhalf of the tea pot 314. The image segmentation algorithm or othercomponent of the system may then determine that there is a portion ofthe March Hare 304 behind a portion of the tea pot 314 (e.g., behindapproximately the top half of the tea pot 314). As a user 101 swipesover the tea pot 314, the audio may play “tea pot in front of a hare.”As the user 101 swipes over the March Hare 304, the audio may play“March Hare behind a tea pot and in front of a window.” The positions ofthe overlapping masks 504, 510 relative to each other may also beincluded in the description. For example, since the window 310 is nearthe upper portion of the March Hare 304, the audio may play “upperportion of hare in front of a window.” If the image segmentationalgorithm identifies the hare's ears as objects, then the audio may play“window behind hare's right ear” when the user 101 swipes over thewindow 310. If the image segmentation identifies the hare's head aswell, then the audio may play “window behind hare's right ear and head”or “hare's right ear and head in front of window” when the user 101swipes over the window 310 or hare 404, respectively.

In the tea cups on a table example, the masks for the tea cups and thetable may overlap. The image segmentation algorithm may determine that aportion of the saucer 316 is behind the tea cup 318, and the table 312is behind both the saucer 316 and the tea cup 318. Thus a particularregion of the image 300 may correspond to multiple overlapping masks516, 518 or to a subset of the multiple overlapping masks. As a user 101swipes over the tea cups 318, the audio may indicate “tea cup on atable.” Alternatively, the audio may identify the smaller mask, byindicating, for example, only “tea cup.” A user 101 may also cyclethrough overlapping masks 516, 518 with a gesture. Using the exampleabove, if the user 101 taps on the mask 518 that corresponds to the teacup 318, audio may play “tea cup” and if the user 101 taps a secondtime, audio may play “table.”

In particular embodiments, social-networking data may be used to helpidentify objects. For example, if a user 101 has a particular cat (e.g.“Fluffy”), depicted in multiple images, the cat may be identified as theparticular cat. As another example, the context of the picture may aidin identifying objects. For example, geo-location data indicating thatan image was taken at Fort Point in San Francisco may make it morelikely that an object is the Golden Gate Bridge. As another example,photo albums may contain similar images, so that if an object isidentified in an image in an album, a given object in another image ofthe album is more likely to be the same object.

A mask 502 may be represented as a matrix of values that correspond topixels of the image 300 and indicate whether the corresponding pixel isin the corresponding object 302 (e.g., value=1 or true) or not in theobject 302 (e.g., value=0 or false). The position of each value in thematrix corresponds to the position of a pixel in the object 302. Themask 502 thus specifies the shape of the object 302, and includes aspecification (which may be implicit or explicit) of the perimeter 402of each object. The perimeter 402 may be specified by the locations ofadjacent 0 and 1 values in the mask matrix. The mask 502 ordinarilycorresponds to a portion of the image 300 having dimensions in pixelsthat are sufficiently large to include the object 302. The location inthe image 300 to which the mask corresponds, e.g., the coordinates ofthe top left corner of the mask 502 in the image 300, may be included inor associated with the mask 502. Although the mask 502 is describedherein as having a particular value (e.g., 1 or true) for each entrythat corresponds to a pixel in the object 302, other representations maybe used, such as a mask 502 in which only the entries that form a1-pixel-wide perimeter 402 around the object 302 are set to a value(e.g., 1 or true) indicating that they correspond to the object 302.Although the perimeter 402 is described as being represented by the mask502, other representations are possible, e.g., a set of curves orvectors that can be mapped to pixels to identify a perimeter 402 at thepixel level in an image 300. Further, although the mask 502 is describedas being represented by a matrix, other representations are possible,e.g., a list of (x,y) coordinates that are included in the object, alist of points that can be interpolated, one or more curves or vectorsthat can be mapped to pixels, and so on.

In particular embodiments, the perimeter 402 that corresponds to a mask502 may be the same as a perimeter that a human viewing the image 300would identify for the object 302, as may occur when there is strongcontrast between the object 302 and its surroundings in the image 300,e.g., a dark object 302 against a light background of a different color.However, the perimeter 402 of an object 302 may be ambiguous ordifficult to identify precisely, e.g., when the boundaries between theobject 302 and its surrounds are amorphous. Thus the perimeter 402 thatcorresponds to the mask 502 may differ from the perimeter a human wouldidentify, but ordinarily such differences are small (e.g., variations ofseveral pixels in distance), and a human would agree that the perimeter402 specified by the mask 502 is a reasonable for the object 302.Further, a mask need not be contiguous (e.g., an object may havemultiple noncontiguous parts, or may be partially occluded by anotherobject).

In particular embodiments, a mask 502 may have a touch area that differsfrom the area of the mask 502. For example, a mask such as the teacupmask 518 may be relatively small, and the touch area of the mask 518 maybe increased to a size greater than the size of the mask 518. Increasingthe touch area in this way may, for example, help a user 101 byproviding larger touch areas for small masks. However, the increasedtouch area of the mask 518 should not overlap other masks, such as themask 516 for the saucer 316 that is adjacent to the mask 518.

In particular embodiments, an object in an image may contain othersmaller objects. That is, at least a portion of the object and at leasta portion of each of the smaller objects may be visible, with thesmaller objects overlapping the larger objects. The smaller objects mayin turn contain still smaller objects, and so on. An object that iscontained in another object is referred to herein as a nested object andmay be identified and classified as described above. Thus an object thatcontains nested objects may have a mask that corresponds to the shape ofthe object in the image 300. Nested objects located within the objectmay also be associated with masks that correspond to the shapes of thenested object. The image segmentation algorithm may generate a list ofobjects nested within an object, and associate the list with the object,so that interactions with the user 101 can provide the list of objectsto the user. For example, when a user 101 points to or swipes on anobject that contains nested objects, the system may provide adescription, e.g., by displaying text, generating braille script, orplaying audio, stating that the object contains other objects, alongwith the types (or names) of the other objects. As another example, ifthe user 101 points to or touches one of the nested objects, the systemmay provide a description including the type or name of the nestedobject, and optionally, of the object within which it is nested. Inanother example, the system may provide descriptions of all the objectsnested within an object, and the descriptions of the objects may beseparated by prompts for a command to continue or stop describing theobjects in the list. A size threshold may be associated with each nestedobject, so that if an object contains one or more objects that aresmaller than the size threshold (e.g., have an area smaller than thesize threshold), then the system may provide descriptions of the nestedobjects as well as the containing object as described above when theuser 101 swipes, points to, or touches the containing object. As afurther example, for each nested object that is larger than the sizethreshold, the system may provide a description for a nested object onlywhen the nested object itself is selected (e.g., by swiping, pointing,touching, or making another gesture that designates the nested object'smask).

In particular embodiments, as introduced above, the system may providefeedback in response to user gestures. The gestures may be received byan input device via a I/O interface 908 of a client system 130, e.g., atouch screen, trackpad, mouse or other pointing device, virtual realityglove, eye tracking device, or other sensor that detects human actions.The gestures may touch, point to, or otherwise indicate specificportions of the image 300, in which case the system may identifyspecific objects 302 displayed in the image at the locations indicatedby the gestures. For example, the gesture may be a finger touching ascreen of the client system 130 at a location where an object in theimage 300 is displayed. In this case, feedback may be provided on thedevice's screen, through the client device's audio output (e.g.,speaker), or by any other type of output that can be generated by thedevice client device 130 (e.g., haptic feedback). This system may haveparticular applications in, for example, aiding the blind, teachingchildren, learning a foreign language, and other tasks that involvecommunication with humans.

Feedback may be produced in response to the gesture input. Audioidentifying the classification of a mask may play as a user 101 touchesa portion of an image 300 corresponding to one or more of the masks502-520. For example, if an image 300 features a lighthouse on a coast,a mask may be generated over the lighthouse, the mask may be classifiedas a lighthouse, and a user 101 may touch the image in a locationcorresponding to the lighthouse. As the user 101 touches the lighthouse,the client device 130 may play audio indicating that the user 101 istouching the lighthouse. As another example, the gesture may be aswiping gesture. As the swiping gesture moves between portions of animage corresponding to different masks, audio may be playedcorresponding to the different masks. For example, if an image 300includes a tea cup 318 on a saucer 316, a user 101 may swipe across theimage 300, and audio identifying the saucer 316 and tea cup 318 may beplayed when the gesture reaches the corresponding masks 516, 518.

The feedback provided in response to a user gesture may be any type ofsuitable feedback. The feedback may be provided when for example, auser's gesture leaves or enters an area corresponding to a mask. Exampletypes of feedback include audio, haptic, or visual. Audio feedback mayinclude audio describing the object corresponding to an object. Hapticfeedback may include vibrating the client system 130 when, e.g., auser's gesture leaves or enters an area corresponding to a mask. Visualfeedback may include displaying a textual description of the object,e.g., “a tea cup” or “a tea cup on a table.” There may also be feedbackas a user's gesture transitions from a mask to a portion of an imagewithout a mask or with an unidentified mask. For example, a sound mayplay or the device may vibrate when these transitions occur. In caseswhere feedback is haptic, vibrating speed or intensity may vary, e.g.,as an indication that a user's gesture is approaching the edge of amask.

Masks from related images may be overlaid on an image. For example, oneimage may depict a box having an open lid and contents, and masks may begenerated for the contents of the box. A second image may depict the boxwith its lid closed. The masks for the contents of the box may beoverlaid on the second image with the lid closed.

FIG. 6 illustrates an example method 600 for generating interactiveobjects based on an image. The method may begin at step 610 by detectingone or more objects in an image. Step 620 may generate at least one maskfor each of the detected objects, wherein each of the masks is definedby a perimeter. Step 630 may classify the detected objects. Step 640 mayreceive gesture input in relation to the image. Step 650 may determinewhether one or more locations associated with the gesture inputcorrelate with any of the masks. Step 660 may provide feedback regardingthe image in response to the gesture input.

Particular embodiments may repeat one or more steps of the method ofFIG. 6, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 6 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 6 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates an example method forgenerating interactive objects based on an image including theparticular steps of the method of FIG. 6, this disclosure contemplatesany suitable method for generating interactive objects based on an imageincluding any suitable steps, which may include all, some, or none ofthe steps of the method of FIG. 6, where appropriate.

Furthermore, although this disclosure describes and illustratesparticular components, devices, or systems carrying out particular stepsof the method of FIG. 6, this disclosure contemplates any suitablecombination of any suitable components, devices, or systems carrying outany suitable steps of the method of FIG. 6.

FIG. 7 illustrates an example of applying a mask 710 generated from animage or sub-object 706 to a three-dimensional object 714 in a virtualreality environment 700. In particular embodiments, a user 704 of avirtual reality environment 700 may request that an image or sub-object706 be made of a portion of the user's view, such as the dog object 702,and a mask 710 be generated based on the image or sub-object 706. Inparticular embodiments, the image or sub-object 706 may be atwo-dimensional (2D) image 706 or a three-dimensional (3D) sub-object706. The user 704 may be a virtual representation of the user 101, andmay be controlled by the user 101 via appropriate virtual realityhardware devices, and the objects in the line of sight of the virtualuser 704 may be displayed to the user 101 using appropriate virtualreality hardware devices. The mask 710 may be generated using imagesegmentation techniques such as DeepMask and SharpMask, and classifiedusing image classification techniques such as MuiltiPathNet. The user704 may apply the mask 710 to a 3D object 714, e.g., a picture frame, inthe virtual reality environment 700. When the mask 710 is applied to a3D object 714, the object 702, which is depicted in the 2D image orrepresented by the 3D sub-object 706 that corresponds to the mask 710,is incorporated into the 3D object 714 as an incorporated image orsub-object 712 of the 3D object 714 to form a virtual object 716, e.g.,a picture frame that incorporates the dog object 702. The incorporatedimage or sub-object 712 may then appear in association with, e.g., as ifattached to or rendered onto a surface of, the 3D object 714 in thevirtual reality environment 700, thus forming a new virtual object 716.For example, the incorporated image or sub-object 712 may be representedas a photograph attached to the 3D object 714, e.g., as if thephotograph is attached to the 3D object 714 with glue, adhesive tape, apushpin, or other form of attachment at a location on the 3D object 714designated by the user 704. As another example, the incorporated imageor sub-object 712 may be represented as if it is painted onto the 3Dobject 714 at a location designated by the user 704. That is, the mask710 may be used like a sticker that depicts the incorporated image orsub-object 712, and can be affixed to the 3D object 714 while moldingits shape to conform to the shape of the 3D object 714 as appropriate.Although particular ways of associating the incorporated image 712 withthe 3D object 714 are described, these examples, and the incorporatedimage 712 may be associated with the 3D object 714 in any suitable way.

In particular embodiments, if the virtual reality environment 700includes a touch-sensitive user interface that uses pressure sensors,then one or more attributes of the mask 710 may be presented in the userinterface when the user 101 touches the mask 710 with at least athreshold pressure (e.g., a pressure that indicates the user is pressingthe touch screen with a force greater than the average force applied inuser interface interactions). Attributes of the mask 710 may includedescriptions of the object 702 or of the image or sub-object 706 fromwhich the mask 710 is generated. For example, if the object 702 is adog, the attributes of the mask may include the text “dog.” If theobject 702 is a man wearing a hat, the attributes may include the text“man wearing a hat.” If the object 702 is a black cat, the attributesmay include the text “furry” and “black.” The attributes may bepresented in the user interface using an appropriate output device, suchas a display screen that displays the attributes, or an audio outputdevice that speaks the text of the attributes. Although the attributesare described as being presented when a user touches the input devicewith at least a threshold pressure, the attributes may be presented inresponse to any other appropriate input, e.g., when the user double-tapson the mask 710 or on the portion of the object 716 that incorporatesthe image or sub-object 712. As another example, the attributes may bepresented in response to the user 704 moving a 3D object that includesthe mask 710 or object 716 towards the eyes or face of the user, ormaking other gestures associated with inspecting the mask 710 or object716 in the virtual environment 700.

In particular embodiments, a virtual reality environment 700 may includea user interface (UI) that a user 704 can interact with to delineate aregion of the 3D environment, such as a two-dimensional region aroundthe dog object 702, to be used to form a two-dimensional (2D) image 706.The 2D image 706 may be a picture of a particular virtual object 702.The particular virtual object 702 may be, e.g., a photograph, a displayscreen, or a shirt on an avatar of a user in the virtual realityenvironment 700. The 2D image 706 may be used to generate a mask 710.For example, the 2D image 706 may be a camera perspective view of anobject 702 in the virtual reality environment 700. The cameraperspective view may represent a view of the user 704, e.g., from theperspective of the user 704, in the virtual reality environment 700. TheUI may provide a tracing mode or command in which the user 704 maydelineate a portion of the virtual reality environment 700 by drawing aperimeter using movement of their finger, head, or eyes (e.g., to tracea perimeter starting from a point determined by a direction in which theuser is initially looking). As another example, the user 704 maydelineate a perimeter using a virtual tool such as a pointer-like objectthat can be used to draw the perimeter around a scene or object in theuser's field of view. A two-dimensional image 706 may then be generatedfrom the portion of the 3D environment within the perimeter from theuser's point of view, such as the dog object 702. The size of theperimeter may be derived from the distance between the user's eyes andthe pointing finger or tool. The delineated region may be converted to a2D image 706 in a plane perpendicular to the user's line of sight, andthe size of the 2D image 706 may correspond to the size of the perimeteraround the region, such as the region that includes the dog object 702.

In particular embodiments, the user 704 may interact with the userinterface to delineate or otherwise select a 3D sub-object 706 of theobject 702. The 3D sub-object 706 may be, e.g., a 3D model of thedelineated or selected region, such as the dog object 702 or adelineated portion of the dog object 702. As another example, the object702 may represent an object from which portions may be detached orbroken off to form a 3D sub-object 706. For example, the object 702 maybe a plant having leaves or flowers that may be detached to formsub-objects 706, or a building having attached icicles that may bebroken off to form sub-objects 706. The 3D model that represents thesub-object 706 may be extracted from a 3D model that represents theobject 702, or may be generated based on the 3D shape of the object 702,for example.

As another example, a 2D or 3D region in an image or sub-object 706 (orother image, such as a virtual photograph) may be delineated bydetecting one or more objects in the image 706 and determining aperimeter of at least one of the detected objects. The perimeter of atleast one of the detected objects may be used as the perimeter of thedelineated region of the 3D environment. If a plurality of objects isdetected, then the delineated region may include the detected objects.For example, perimeter of the delineated region may correspond to a 2Dor 3D bounding box that contains the plurality of objects.

In particular embodiments, the delineated 2D or 3D region may be aregion in the user's field of view, e.g., to a region having a specifiedarea or dimensions. The area or dimensions of the region may becalculated on a plane perpendicular to the user's field of view, such asthe plane of the image 706. In one example, the region may be the user'sentire field of view, so that every object visible to the user may beone of the detected objects. In another example, the region may be areduced-size portion of the user's field of view, such as a regioncentered on the user's line of sight and having a specified area ordimensions, e.g., an area that is 30%, 50%, 75%, or other percentage ofthe area of the user's field of view. The area or dimensions may bespecified by the user or determined automatically. For example, if thecomputing device performing image recognition is able to recognize andgenerate masks 710 for every object in the user's entire field of viewin real-time, the region may be the user's entire field of view.

As another example, the UI may enable the user 704 to point at an object702 and request that the object 702 and/or all nearby objects within apredetermined distance or radius of the object be delineated. Atwo-dimensional image 706 that includes the object(s) 702 may then begenerated from the user's view of the object(s) 702 as described above.Alternatively, a 3D sub-object that includes the object(s) 702 may begenerated from the user's view of the object(s) 702. Although particularexamples of user interfaces for delineating a portion of the 3Denvironment are described, such delineation may be performed using anyappropriate user interface. A user 704 may be able to select aparticular mask 710 (from a set of masks) that corresponds to aparticular object 702 in the image 706. For example, a user may be ableto toggle between masks 710 or select a mask 710 with a gesture. A usermay select multiple masks 710. For example, a user may gesture with aswipe motion and touch multiple masks 710.

Once one or more masks 710 are selected, the portion of the image 706corresponding to the selected masks 710 may be used to generate a maskobject 708. The mask object 708 may be a two-dimensional image in thevirtual reality environment (e.g., a sticker), and may be rendered as a2D object or a 3D object. Alternatively, the mask object 708 may be a 3Dobject in the virtual reality environment (e.g., a sticker that appearsto be a 3D object, or a 3D sub-object delineated or otherwise generatedfrom the object 702).

In particular embodiments, the mask object 708 that represents the mask710 in the virtual reality environment 700 may be used by the user,e.g., as a 3D object (which may be flat or nearly flat, similar to acard, or may have 3D properties, similar to a piece of paper that doesnot remain flat, or, e.g., a flower detached from a plant, or an iciclebroken off from a building) in the virtual reality environment, tocreate a new virtual object 716 based on a 3D object 714 by applying themask 710 associated with the mask object 708 to the 3D object. Forexample, a user 704 may place the mask object 708 on or near the 3Dobject 714 in the virtual environment 700. The user 704 may perform anaffixing motion similar to placing a sticker on an object, e.g., byholding the mask object 708 in a position adjacent to the 3D object 714,and/or pushing the mask object 708 in the direction of the 3D object714. As another example, if the 3D object 714 is a pen, then the maskobject 708 may be used to add a skin image based on the portion of theimage 706 from which the mask 710 was created to a cylinder shape thatmatches the pen. A mask object 708 may also be manipulated in thevirtual reality environment 700 (e.g., a user may extrude a 2D maskobject 708 into a 3D object 714, transform the image 706 represented bythe mask 710, and so on). As another example, images depicting sides ofa box may be joined to create a 3D box in virtual reality. The maskobjects 708 may be glued together, joined by a hinge, or joined in anyother suitable combination.

In particular embodiments, a mask 710 may be applied to a 3D object 714to generate a virtual object 716 that includes a combination of the mask710 and the 3D object 714. The mask 710 may be applied to the 3D object714 as a result of actions performed by the user 704 in the virtualreality environment 700. The user 704 may associate the mask 710 (or acorresponding mask object 708) with the 3D object 714 to cause the mask710 to be applied to the 3D object 714, as described below. Inparticular embodiments, the mask 710 may be applied to the 3D object 714by generating a surface mesh based on the mask 710 and incorporating thesurface mesh onto or into the 3D object 714, e.g., by applying the meshto the 3D object 714 so that the mesh conforms to the shape of the 3Dobject. The surface mesh may be based on the object 702 delineated inthe image 706, such as the dog object 702. The surface mesh may be, forexample, a polygon mesh. A polygon mesh may be a collection of vertices,edges, and faces that represents the shape of a 3D object. The faces maybe triangles, quadrilaterals, or other polygons. A vertex may be aposition in 3D space along with other information, such as color. Anedge is a connection between two vertices. A face may be a set of edges,e.g., three edges for a triangle face, or four edges for a quad face. Asimple representation of a polygon mesh may be a set of vertices and,for each vertex in the set, a list of other vertices to which the vertexis connected. The edge and face information is implicit in thisrepresentation. Other representations may include explicit edge or faceinformation.

The mask object 710 may have properties in the virtual realityenvironment 700 based on object type(s) identified in the image 706. Inthe example above, if the mask object 708 is a pen, then the pen in thevirtual reality environment 700 may have corresponding properties (e.g.,the virtual pen may be able to write in the virtual realityenvironment). The properties of the mask object 708 or the 3D object 714may be set manually, e.g. by a user manually labeling the mask object708, mask 710, or 3D object 714 with a particular object type (or objectname or other kind of label). For example, a mask object 708 that lookslike a sword may be labeled with the object type “pen” to cause the maskobject 708 to have the properties of a pen, such as being able towrite). In one example, the properties of the mask object 708 may beapplied to the 3D object 714. If a mask 710 or mask object 708 thatlooks like a sword and acts like a pen is applied to a 3D object 714,then the appearance of the sword, e.g., a 2D image 706 of a swordassociated with the mask 710 or mask object 708 may be applied to the 3Dobject 714, and the pen property may also be applied to the 3D object714, so that the 3D object 714 may have the properties of a pen, such asbeing able to write. As another example, a 3D object 714 that has theproperties of a sword may be labeled “pen” (e.g., by a user) to causethe 3D object 714 to have the properties of a pen. In particularembodiments, the mask object 708 may include one or more objects ofparticular types, and images of the included objects may be associatedwith a 3D object 714. In particular embodiments, a 3D object 714 mayhave one or more slots that may accept objects, such as mask objects708, of particular types. Each slot may be restricted to only acceptingobjects of the particular associated type. Alternatively, each slot maybe configured to perform specified actions when a mask object 708 havinga particular type is detected within a threshold distance of the 3Dobject 714. For example, if the user 714 carries the mask object 708 toa location near a 3D object 714 that accepts objects of the same type asthe mask object 708, then the mask object 708 may automaticallyassociate itself with the 3D object 714, or may prompt the user forpermission to do so. As another example, if the user attempts toassociate a mask object 708 with a 3D object 714 that does not acceptthe mask object's type, then the association is not established.

FIG. 8 illustrates an example method 800 for generating a mask from animage and applying the mask object to a three-dimensional object in avirtual reality environment. The method may begin at step 810 bydelineating a region in a two-dimensional (2D) image in a virtualreality environment. Step 820 may generate a mask based on an objectdetected in the delineated region, wherein the mask is defined by aperimeter. Step 830 may classify the detected object. Step 840 maygenerate a virtual object in the virtual reality environment, whereinthe virtual object incorporates the detected object, and wherein thevirtual object is generated by applying the mask to a three-dimensional(3D) object.

Particular embodiments may repeat one or more steps of the method ofFIG. 8, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 8 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 8 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates an example method forgenerating a mask from an image and applying the mask object to athree-dimensional object in a virtual reality environment including theparticular steps of the method of FIG. 8, this disclosure contemplatesany suitable method for generating a mask from an image and applying themask object to a three-dimensional object in a virtual realityenvironment including any suitable steps, which may include all, some,or none of the steps of the method of FIG. 8, where appropriate.Furthermore, although this disclosure describes and illustratesparticular components, devices, or systems carrying out particular stepsof the method of FIG. 8, this disclosure contemplates any suitablecombination of any suitable components, devices, or systems carrying outany suitable steps of the method of FIG. 8.

FIG. 9 illustrates an example computer system 900. In particularembodiments, one or more computer systems 900 perform one or more stepsof one or more methods described or illustrated herein. In particularembodiments, one or more computer systems 900 provide functionalitydescribed or illustrated herein. In particular embodiments, softwarerunning on one or more computer systems 900 performs one or more stepsof one or more methods described or illustrated herein or providesfunctionality described or illustrated herein. Particular embodimentsinclude one or more portions of one or more computer systems 1000.Herein, reference to a computer system may encompass a computing device,and vice versa, where appropriate. Moreover, reference to a computersystem may encompass one or more computer systems, where appropriate.

This disclosure contemplates any suitable number of computer systems900. This disclosure contemplates computer system 900 taking anysuitable physical form. As example and not by way of limitation,computer system 900 may be an embedded computer system, a system-on-chip(SOC), a single-board computer system (SBC) (such as, for example, acomputer-on-module (COM) or system-on-module (SOM)), a desktop computersystem, a laptop or notebook computer system, an interactive kiosk, amainframe, a mesh of computer systems, a mobile telephone, a personaldigital assistant (PDA), a server, a tablet computer system, anaugmented/virtual reality device, or a combination of two or more ofthese. Where appropriate, computer system 900 may include one or morecomputer systems 900; be unitary or distributed; span multiplelocations; span multiple machines; span multiple data centers; or residein a cloud, which may include one or more cloud components in one ormore networks. Where appropriate, one or more computer systems 900 mayperform without substantial spatial or temporal limitation one or moresteps of one or more methods described or illustrated herein. As anexample and not by way of limitation, one or more computer systems 900may perform in real time or in batch mode one or more steps of one ormore methods described or illustrated herein. One or more computersystems 900 may perform at different times or at different locations oneor more steps of one or more methods described or illustrated herein,where appropriate.

In particular embodiments, computer system 900 includes a processor 902,memory 904, storage 906, an input/output (I/O) interface 908, acommunication interface 910, and a bus 912. Although this disclosuredescribes and illustrates a particular computer system having aparticular number of particular components in a particular arrangement,this disclosure contemplates any suitable computer system having anysuitable number of any suitable components in any suitable arrangement.

In particular embodiments, processor 902 includes hardware for executinginstructions, such as those making up a computer program. As an exampleand not by way of limitation, to execute instructions, processor 902 mayretrieve (or fetch) the instructions from an internal register, aninternal cache, memory 904, or storage 906; decode and execute them; andthen write one or more results to an internal register, an internalcache, memory 904, or storage 906. In particular embodiments, processor902 may include one or more internal caches for data, instructions, oraddresses. This disclosure contemplates processor 902 including anysuitable number of any suitable internal caches, where appropriate. Asan example and not by way of limitation, processor 902 may include oneor more instruction caches, one or more data caches, and one or moretranslation lookaside buffers (TLBs). Instructions in the instructioncaches may be copies of instructions in memory 904 or storage 906, andthe instruction caches may speed up retrieval of those instructions byprocessor 902. Data in the data caches may be copies of data in memory904 or storage 906 for instructions executing at processor 902 tooperate on; the results of previous instructions executed at processor902 for access by subsequent instructions executing at processor 902 orfor writing to memory 904 or storage 906; or other suitable data. Thedata caches may speed up read or write operations by processor 902. TheTLBs may speed up virtual-address translation for processor 902. Inparticular embodiments, processor 902 may include one or more internalregisters for data, instructions, or addresses. This disclosurecontemplates processor 902 including any suitable number of any suitableinternal registers, where appropriate. Where appropriate, processor 902may include one or more arithmetic logic units (ALUs); be a multi-coreprocessor; or include one or more processors 902. Although thisdisclosure describes and illustrates a particular processor, thisdisclosure contemplates any suitable processor.

In particular embodiments, memory 904 includes main memory for storinginstructions for processor 902 to execute or data for processor 902 tooperate on. As an example and not by way of limitation, computer system900 may load instructions from storage 906 or another source (such as,for example, another computer system 900) to memory 904. Processor 902may then load the instructions from memory 904 to an internal registeror internal cache. To execute the instructions, processor 902 mayretrieve the instructions from the internal register or internal cacheand decode them. During or after execution of the instructions,processor 902 may write one or more results (which may be intermediateor final results) to the internal register or internal cache. Processor902 may then write one or more of those results to memory 904. Inparticular embodiments, processor 902 executes only instructions in oneor more internal registers or internal caches or in memory 904 (asopposed to storage 906 or elsewhere) and operates only on data in one ormore internal registers or internal caches or in memory 904 (as opposedto storage 906 or elsewhere). One or more memory buses (which may eachinclude an address bus and a data bus) may couple processor 902 tomemory 904. Bus 912 may include one or more memory buses, as describedbelow. In particular embodiments, one or more memory management units(MMUs) reside between processor 902 and memory 904 and facilitateaccesses to memory 904 requested by processor 902. In particularembodiments, memory 904 includes random access memory (RAM). This RAMmay be volatile memory, where appropriate Where appropriate, this RAMmay be dynamic RAM (DRAM) or static RAM (SRAM). Moreover, whereappropriate, this RAM may be single-ported or multi-ported RAM. Thisdisclosure contemplates any suitable RAM. Memory 904 may include one ormore memories 904, where appropriate. Although this disclosure describesand illustrates particular memory, this disclosure contemplates anysuitable memory.

In particular embodiments, storage 906 includes mass storage for data orinstructions. As an example and not by way of limitation, storage 906may include a hard disk drive (HDD), a floppy disk drive, flash memory,an optical disc, a magneto-optical disc, magnetic tape, or a UniversalSerial Bus (USB) drive or a combination of two or more of these. Storage906 may include removable or non-removable (or fixed) media, whereappropriate. Storage 906 may be internal or external to computer system900, where appropriate. In particular embodiments, storage 906 isnon-volatile, solid-state memory. In particular embodiments, storage 906includes read-only memory (ROM). Where appropriate, this ROM may bemask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM),electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM),or flash memory or a combination of two or more of these. Thisdisclosure contemplates mass storage 906 taking any suitable physicalform. Storage 906 may include one or more storage control unitsfacilitating communication between processor 902 and storage 906, whereappropriate. Where appropriate, storage 906 may include one or morestorages 906. Although this disclosure describes and illustratesparticular storage, this disclosure contemplates any suitable storage.

In particular embodiments, I/O interface 908 includes hardware,software, or both, providing one or more interfaces for communicationbetween computer system 900 and one or more I/O devices. Computer system900 may include one or more of these I/O devices, where appropriate. Oneor more of these I/O devices may enable communication between a personand computer system 900. As an example and not by way of limitation, anI/O device may include a keyboard, keypad, microphone, monitor, mouse,printer, scanner, speaker, still camera, stylus, tablet, touch screen,trackball, video camera, another suitable I/O device or a combination oftwo or more of these. An I/O device may include one or more sensors.This disclosure contemplates any suitable I/O devices and any suitableI/O interfaces 908 for them. Where appropriate, I/O interface 908 mayinclude one or more device or software drivers enabling processor 902 todrive one or more of these I/O devices. I/O interface 908 may includeone or more I/O interfaces 908, where appropriate. Although thisdisclosure describes and illustrates a particular I/O interface, thisdisclosure contemplates any suitable I/O interface.

In particular embodiments, communication interface 910 includeshardware, software, or both providing one or more interfaces forcommunication (such as, for example, packet-based communication) betweencomputer system 900 and one or more other computer systems 900 or one ormore networks. As an example and not by way of limitation, communicationinterface 910 may include a network interface controller (NIC) ornetwork adapter for communicating with an Ethernet or other wire-basednetwork or a wireless NIC (WNIC) or wireless adapter for communicatingwith a wireless network, such as a WI-FI network. This disclosurecontemplates any suitable network and any suitable communicationinterface 910 for it. As an example and not by way of limitation,computer system 900 may communicate with an ad hoc network, a personalarea network (PAN), a local area network (LAN), a wide area network(WAN), a metropolitan area network (MAN), or one or more portions of theInternet or a combination of two or more of these. One or more portionsof one or more of these networks may be wired or wireless. As anexample, computer system 900 may communicate with a wireless PAN (WPAN)(such as, for example, a BLUETOOTH WPAN), a WI-FI network, a WI-MAXnetwork, a cellular telephone network (such as, for example, a GlobalSystem for Mobile Communications (GSM) network), or other suitablewireless network or a combination of two or more of these. Computersystem 900 may include any suitable communication interface 910 for anyof these networks, where appropriate. Communication interface 910 mayinclude one or more communication interfaces 910, where appropriate.Although this disclosure describes and illustrates a particularcommunication interface, this disclosure contemplates any suitablecommunication interface.

In particular embodiments, bus 912 includes hardware, software, or bothcoupling components of computer system 900 to each other. As an exampleand not by way of limitation, bus 912 may include an AcceleratedGraphics Port (AGP) or other graphics bus, an Enhanced Industry StandardArchitecture (EISA) bus, a front-side bus (FSB), a HYPERTRANSPORT (HT)interconnect, an Industry Standard Architecture (ISA) bus, an INFINIBANDinterconnect, a low-pin-count (LPC) bus, a memory bus, a Micro ChannelArchitecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, aPCI-Express (PCIe) bus, a serial advanced technology attachment (SATA)bus, a Video Electronics Standards Association local (VLB) bus, oranother suitable bus or a combination of two or more of these. Bus 912may include one or more buses 912, where appropriate. Although thisdisclosure describes and illustrates a particular bus, this disclosurecontemplates any suitable bus or interconnect.

Herein, a computer-readable non-transitory storage medium or media mayinclude one or more semiconductor-based or other integrated circuits(ICs) (such, as for example, field-programmable gate arrays (FPGAs) orapplication-specific ICs (ASICs)), hard disk drives (HDDs), hybrid harddrives (HHDs), optical discs, optical disc drives (ODDs),magneto-optical discs, magneto-optical drives, floppy diskettes, floppydisk drives (FDDs), magnetic tapes, solid-state drives (SSDs),RAM-drives, SECURE DIGITAL cards or drives, any other suitablecomputer-readable non-transitory storage media, or any suitablecombination of two or more of these, where appropriate. Acomputer-readable non-transitory storage medium may be volatile,non-volatile, or a combination of volatile and non-volatile, whereappropriate.

Herein, “or” is inclusive and not exclusive, unless expressly indicatedotherwise or indicated otherwise by context. Therefore, herein, “A or B”means “A, B, or both,” unless expressly indicated otherwise or indicatedotherwise by context. Moreover, “and” is both joint and several, unlessexpressly indicated otherwise or indicated otherwise by context.Therefore, herein, “A and B” means “A and B, jointly or severally,”unless expressly indicated otherwise or indicated otherwise by context.

The scope of this disclosure encompasses all changes, substitutions,variations, alterations, and modifications to the example embodimentsdescribed or illustrated herein that a person having ordinary skill inthe art would comprehend. The scope of this disclosure is not limited tothe example embodiments described or illustrated herein. Moreover,although this disclosure describes and illustrates respectiveembodiments herein as including particular components, elements,feature, functions, operations, or steps, any of these embodiments mayinclude any combination or permutation of any of the components,elements, features, functions, operations, or steps described orillustrated anywhere herein that a person having ordinary skill in theart would comprehend. Furthermore, reference in the appended claims toan apparatus or system or a component of an apparatus or system beingadapted to, arranged to, capable of, configured to, enabled to, operableto, or operative to perform a particular function encompasses thatapparatus, system, component, whether or not it or that particularfunction is activated, turned on, or unlocked, as long as thatapparatus, system, or component is so adapted, arranged, capable,configured, enabled, operable, or operative. Additionally, although thisdisclosure describes or illustrates particular embodiments as providingparticular advantages, particular embodiments may provide none, some, orall of these advantages.

What is claimed is:
 1. A method comprising: by a computing device,detecting one or more objects in an image; by the computing device,generating at least one mask for each of the detected objects, whereineach of the masks is defined by a perimeter; by the computing device,classifying the detected objects; by the computing device, receivinggesture input in relation to the image; by the computing device,determining whether one or more locations associated with the gestureinput correlate with any of the masks; and by a computing device,providing feedback regarding the image in response to the gesture input.2. The method of claim 1, wherein each of the masks comprises dataidentifying the corresponding detected object, and the perimeter thatdefines each mask corresponds to a perimeter of the correspondingdetected object.
 3. The method of claim 2, wherein the perimeter of thecorresponding detected object separates the detected object from one ormore portions of the image that are distinct from the detected object.4. The method of claim 2, wherein the mask comprises a matrix of datavalues that correspond to pixels of at least a portion of the image,pixels located inside the perimeter that defines the mask correspond todata values having a first value, and pixels located outside theperimeter that defines the mask correspond to data values having asecond value.
 5. The method of claim 1, wherein the one or more objectscorrespond to one or more segments of the image, and the segments aredetected by an image segmentation algorithm.
 6. The method of claim 1,wherein the one or more objects are classified as corresponding to aspecified object type, and the feedback regarding the image comprisesthe specified object type.
 7. The method of claim 6, wherein thefeedback is played as speech by an audio output component of thecomputing device.
 8. The method of claim 6, wherein the feedback isdisplayed as text by a display component of the computing device.
 9. Themethod of claim 1, wherein the one or more objects are classified ashaving a specified object name, and the feedback regarding the imagecomprises the specified object name.
 10. The method of claim 1, whereinthe gesture input comprises a swipe gesture across a touch screen of thecomputing device or a tap gesture on the touch screen, and at least aportion of the gesture is detected at a location on the touch screen atwhich a portion of the image is displayed.
 11. The method of claim 1,wherein the gesture input comprises a pointing gesture that is detectedas indicating a location on a display screen of the computing device atwhich a portion of the image is displayed.
 12. The method of claim 1,wherein determining whether one or more locations associated with thegesture input correlate with any of the masks comprises: determiningwhether, for each of the detected objects, the one or more locationsassociated with the gesture input correspond to the mask for thedetected object.
 13. The method of claim 12, wherein the one or morelocations associated with the gesture input correspond to the mask forthe detected object when the one or more locations are within theperimeter that defines the mask.
 14. The method of claim 1, wherein themasks include at least two masks that partially or fully overlap, thetwo masks include a first mask that corresponds to a first object and asecond mask that corresponds to a second object, the first and secondobjects are classified as having specified first and second object typesand related by a specified relationship, and when a location associatedwith the gesture input corresponds to a region in which the masksoverlap, the feedback regarding the image comprises object types of thefirst and second inputs and a description of the specified relationship.15. The method of claim 1, wherein the masks include at least two masksthat partially or fully overlap, the two masks include a first mask thatcorresponds to a first object and a second mask that corresponds to asecond object that is smaller than the first object, the first andsecond objects are classified as having specified first and secondobject types, and when a location associated with the gesture inputcorresponds to a region in which the masks overlap, and the feedbackregarding the image comprises an object type of the smaller of the firstand second objects.
 16. The method of claim 1, wherein the masks includeat least first and second masks that at least partially overlap, alocation associated with the gesture input corresponds to a region inwhich the masks overlap, and providing feedback regarding the image inresponse to the gesture input comprises: playing, by an audio componentof the computing device, speech that includes an object type of a firstobject associated with the first mask; waiting for user input; and inresponse to the user input, playing, by the audio component of thecomputing device, speech that includes an object type of a second objectassociated with the second mask.
 17. One or more computer-readablenon-transitory storage media embodying software that is operable whenexecuted to: detect one or more objects in an image; generate at leastone mask for each of the detected objects, wherein each of the masks isdefined by a perimeter; classify the detected objects; receive gestureinput in relation to the image; determine whether one or more locationsassociated with the gesture input correlate with any of the masks; andprovide feedback regarding the image in response to the gesture input.18. The media of claim 17, wherein each of the masks comprises dataidentifying the corresponding detected object, and the perimeter thatdefines each mask corresponds to a perimeter of the correspondingdetected object.
 19. A system comprising: one or more processors; and amemory coupled to the processors comprising instructions executable bythe processors, the processors being operable when executing theinstructions to: detect one or more objects in an image; generate atleast one mask for each of the detected objects, wherein each of themasks is defined by a perimeter; classify the detected objects; receivegesture input in relation to the image; determine whether one or morelocations associated with the gesture input correlate with any of themasks; and provide feedback regarding the image in response to thegesture input.
 20. The system of claim 19, wherein each of the maskscomprises data identifying the corresponding detected object, and theperimeter that defines each mask corresponds to a perimeter of thecorresponding detected object.